<?php
/**
 * +--------------------------------------------------------+
 * @Created by Phpstorm.
 * @Category 2022_06_30_141510_create_collect_articles_table.php
 * @Depiction
 * @Author hwy <429208948@qq.com>
 * @Date 2022/6/30  14:15
 * +--------------------------------------------------------+
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;

class CreateCollectArticlesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('collect_articles', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title');
            $table->string('href');
            $table->smallInteger('source')->nullable()->comment('来源 1 36k，2虎嗅  3 tmt');
            $table->timestamps();
        });

        DB::statement("ALTER TABLE `la_collect_articles` comment '资讯文章'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('collect_articles');
    }
}

